/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package demo924;

import java.util.Scanner;

public class RandomDemo {

    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int x;
        int y;
        int z;
        for (int i = 1; i <= 3; i++) {
            x = (int) (Math.random() * 10) + 1;
            y = (int) (Math.random() * 26) + 65;
            System.out.println(x + "+" + y + "=?");
            z = sc.nextInt();
            if (z == x + y) {
                System.out.println("correct");
            } else {
                System.out.println("Sorry, incorrect");
            }
        }

    }
}
